﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NFL.DataModels;
using System.Data.SqlClient;
using System.Data;

namespace NFL.BusinessLayer
{
    public class DBAccess
    {

        #region CRUD Operation

        public bool addNewUser(Users user)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {                
                new SqlParameter("@LastName", user.LastName),
                new SqlParameter("@FirstName", user.FirstName),
                new SqlParameter("@Email", user.Email),
                new SqlParameter("@Password", user.Password),
                new SqlParameter("@City", user.PasswordResetQuestion)
            };

            return SqlHelper.ExecuteNonQuery("CreateUserAccount", CommandType.StoredProcedure, parameters);
        }

        //public bool updateUser(Users user)
        //{
         
        //    SqlParameter[] parameters = new SqlParameter[]
        //    {                
        //        new SqlParameter("@LastName", user.LastName),
        //        new SqlParameter("@FirstName", user.FirstName),
        //        new SqlParameter("@Email", user.Email),
        //        new SqlParameter("@Password", user.Password),
        //        new SqlParameter("@City", user.PasswordResetQuestion)
        //    };

        //    return SqlHelper.ExecuteNonQuery("CreateUserAccount", CommandType.StoredProcedure, parameters);
        //}
        

        #endregion

    }
}
